package com.sofwin.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sofwin.mapper.BUserMapper;
import com.sofwin.pojo.BUser;
import com.sofwin.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    BUserMapper mapper;

    @Override
    public void test() {
        System.out.println("insert");
    }

    @Override
    public PageInfo<BUser> queryByPage(BUser user, Integer pageNumber, Integer pageSize) {
        PageHelper.startPage(pageNumber,pageSize);
        List<BUser> bUsers = mapper.selectByExample(null);


        return new PageInfo<>(bUsers);
    }
}
